<?php
//获取根目录$path
require_once '../common/RootPath.php';
RootPath::importPath("common/RequestHandler.php");
abstract class AuthAction extends RequestHandler
{

    public function GetMapping($args)
    {
        throw new Exception("Request method incorrect");
    }

    public function PostMapping($args)
    {
        $this->login($args);
    }

    public function PutMapping($args)
    {
        $this->register($args);
    }

    public function DeleteMapping($args)
    {
       $this->logout($args);
    }

    //登陆验证用户名和密码
    public abstract function login($args);

    //退出
    public abstract function logout($args);

    public abstract function register($args);
}